/* eslint-disable import/prefer-default-export */
import { request } from '@/request/v2';

// 修改头像
export const updateProfile = (payload) => {
  return request({
    method: 'POST',
    url: `https://www.thuguardian.com/api/older/update_profile`,
    payload,
    codeIgnore: true,
  });
};

// 修改名称
export const updateName = (payload) => {
  return request({
    method: 'POST',
    url: `https://www.thuguardian.com/api/older/update_name`,
    payload,
    codeIgnore: true,
  });
};

// 修改性别
export const updateSex = (payload) => {
  return request({
    method: 'POST',
    url: `https://www.thuguardian.com/api/older/update_sex`,
    payload,
    codeIgnore: true,
  });
};

// 修改出生年月日
export const updateBirthday = (payload) => {
  return request({
    method: 'POST',
    url: `https://www.thuguardian.com/api/older/update_birthday`,
    payload,
    codeIgnore: true,
  });
};


// 获取验证码
export const getCode = (payload) => {
  return request({
    method: 'get',
    url: `https://www.thuguardian.com/api/get_code`,
    payload,
    codeIgnore: true,
  });
};

// 修改手机号
export const updateMobile = (payload) => {
  return request({
    method: 'POST',
    url: `https://www.thuguardian.com/api/older/update_mobile`,
    payload,
    codeIgnore: true,
  });
};

// 修改地址
export const updateAddress = (payload) => {
  return request({
    method: 'POST',
    url: `https://www.thuguardian.com/api/older/update_address`,
    payload,
    codeIgnore: true,
  });
};